package com.cn.service.server.mc.Impl;

import com.cn.bean.pojo.mc.*;
import com.cn.mapper.dao.db1.mc.HcxxDao;
import com.cn.service.server.mc.HcxxService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class HcxxServiceImpl implements HcxxService {
    @Autowired(required = false)
    private HcxxDao hcxxDao;

    @Override
    public List<Hcxx> selectHcxx(int limit, int page, String djBh, String k3WlBm) {
        return hcxxDao.selectHcxx(limit, page, djBh, k3WlBm);
    }

    @Override
    public int addHcxx(String hcBh, String hcMc, BigDecimal gg, String sl, String dw, String bz, String djBh, String gzmDcMxcs, String rs, String hysj, String sqrGh, String sqrXm, String sqBm, String sqSj) {
        return hcxxDao.addHcxx(hcBh, hcMc, gg, sl, dw, bz, djBh, gzmDcMxcs, rs, hysj, sqrGh, sqrXm, sqBm, sqSj);
    }


    @Override
    public int delHcxx(String hcBh) {
        Boolean c = hcxxDao.delhcxx(hcBh);
        if (c) {
            return 1;
        }
        return 0;
    }

    @Override
    public int updateHcxx(String hcBh, String hcMc, BigDecimal gg, String sl, String dw, String bz, String djBh, String gzmDcMxcs, String rs, String xgrGh, String xgrXm, String xgrBm, String xgrSj) {
        return hcxxDao.updateHcxx(hcBh, hcMc, gg, sl, dw, bz, djBh, gzmDcMxcs, rs, xgrGh, xgrXm, xgrBm, xgrSj);
    }

    @Override
    public int insertMcHy(String sqrGh, String sqrXm, String sqrBm, String sqSj, Hcxx hcxx) {
        return hcxxDao.insertMcHy(sqrGh, sqrXm, sqrBm, sqSj, hcxx);
    }


    @Override
    public Integer getAutoId() {
        return hcxxDao.getAutoId();
    }

    @Override
    public int upDateK3FlXxZt(String djBh) {
        return hcxxDao.upDateK3FlXxZt(djBh);
    }

    @Override
    public List<K3FlXx> getK3FlXx(int limit, int page, String djBh, String k3Mc, String parentId, Integer zt) {
        return hcxxDao.getK3FlXx(limit,page,djBh,k3Mc,parentId,zt);
    }

    @Override
    public int addMcHc(String sqrGh, String sqrXm, String sqrBm, String sqSj, String gx, String sb, String banZu, String bz, int id, String documentNumber, String djsj, int zt, int shZt) {
        return hcxxDao.addMcHc(sqrGh,sqrXm,sqrBm,sqSj,gx,sb,banZu,bz,id,documentNumber,djsj,zt,shZt);
    }


    @Override
    public int addMcHcList(McHcList mcHcList) {
        return hcxxDao.addMcHcList(mcHcList);
    }

    @Override
    public Integer getMcHcAutoid() {
        return hcxxDao.getMcHcAutoid();
    }

    @Override
    public Integer getMcHcListAutoid() {
        return hcxxDao.getMcHcListAutoid();
    }

    @Override
    public List<McHc> getMcMxList(int limit, int page, String documentNumber, String gx, int zt) {
        return hcxxDao.getMcMxList(limit,page,documentNumber,gx,zt);
    }

    @Override
    public List<McHcList> getMcHcList(int id) {
        return hcxxDao.getMcHcList(id);
    }

    @Override
    public int upDateMcHc(String documentNumber, String xgrGh, String xgrXm, String xgrBm, String xgSj, String gx, String sb, String banZu, String bz) {
        return hcxxDao.upDateMcHc(documentNumber,xgrGh,xgrXm,xgrBm,xgSj,gx,sb,banZu,bz);
    }

    @Override
    public int deleteMcHcList(int parentId) {
        return hcxxDao.deleteMcHcList(parentId);
    }

    @Override
    public int upDateMcHcSh(int id, int zt, int shZt, String shrGh, String shrXm, String shrBm, String shSj) {
        return hcxxDao.upDateMcHcSh(id,zt,shZt,shrGh,shrXm,shrBm,shSj);
    }

    @Override
    public Integer isCite(int gzmDcMxcs, String djBh) {
        return hcxxDao.isCite(gzmDcMxcs,djBh);
    }
}
